package models

import (
	"time"
)

type Post struct {
	ID        int `gorm:"primaryKey`
	Body      string
	UserID    int
	ThreadID  int
	User      User
	Thread    Thread
	CreatedAt time.Time
}

func (p *Post) CreatedDate() string {
	return p.CreatedAt.Format("2006-01-02 15:04:05")
}
